<template>
	<view class="page">
		<navigator class="item" url="/pages/my/components/collect/index">
			<uni-icons type="heart-filled" size="24"></uni-icons>
			<text class="txt">我的收藏</text>
		</navigator>
		<navigator class="item" url="/pages/my/components/topic/index">
			<uni-icons type="chatbubble-filled" size="24"></uni-icons>
			<text class="txt">最近话题</text>
		</navigator>
		<navigator class="item" url="/pages/my/components/reply/index">
			<uni-icons type="chat-filled" size="24"></uni-icons>
			<text class="txt">最近回复</text>
		</navigator>
		<view class="item" @click="logout">
			<uni-icons type="clear" size="24"></uni-icons>
			<text class="txt">退出</text>
		</view>
	</view>
</template>

<script>
	export default {
		methods: {
			logout (){
				uni.showToast({
					title: '退出成功'
				})
				uni.clearStorage()
				setTimeout(() => {
					uni.switchTab({
						url: '/pages/index/index'
					})
				}, 500)
			}
		}
	}
</script>

<style lang="scss">
	.page{
		margin-top: 15px;
		background-color: #fff;
		uni-icons text,
		.uni-icons{
			margin-right: 15px;
			color: $baseColor!important;
			border-bottom: none!important;
		}
		.item{
			display: flex;
			padding-left: 15px;
			padding-top: 15px;
			line-height: 1;
			&:active{
				background-color: #F2F2F2;
			}
		}
		.txt{
			display: inline-block;
			width: 100%;
			padding: 4px 0 15px;
			font-size: 16px;
			color: #333;
			border-bottom: 1px solid #eee;
		}
	}
</style>
